<template>
  <basic-card
    :title="$t('menu.log_manage')"
    :iconClass="'iconfont icon-ludeng'">
    <basic-table
      :pageMethod="pageMethod"
      :tableForm="tableForm">
      <template #table-top="basicTable">
        <el-form ref="form" :inline="true" size="small" class="text-right">
          <el-form-item>
            <el-input
              v-model="tableForm.search"
              @change="basicTable.table.refresh"
            ></el-input>
          </el-form-item>
          <el-form-item> </el-form-item>
        </el-form>
      </template>
      <template #table-column>
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="p1" :label="'操作时间'"></el-table-column>
        <el-table-column prop="p2" :label="'操作用户 '"></el-table-column>
        <el-table-column prop="p3" :label="'操作类型'"></el-table-column>
        <el-table-column prop="p4" :label="'操作数据'"></el-table-column>
        <el-table-column prop="p5" :label="'操作结果'"></el-table-column>
      </template>
    </basic-table>
  </basic-card>
</template>
<script lang="ts">
import Vue from 'vue';
import BasicCard from "@/components/Basic/Card/BasicCard.vue";
import BasicTable from "@/components/Basic/Table/BasicTable.vue";
import BasicDeleteDialop from "@/components/Basic/Dialop/BasicDeleteDialop.vue";
export default Vue.extend({
  components: { BasicCard, BasicTable, BasicDeleteDialop },
  data() {
    return {
      tableForm: {
        search: ""
      },
      monitorList: [
        {
          p1: "2020-10-10 23:23:11",
          p2: "admin",
          p3: "新增路灯设备",
          p4: "{\"id\": \"123456\"}",
          p5: "成功"
        },
        {
          p1: "2020-10-10 23:23:11",
          p2: "admin",
          p3: "新增路灯设备",
          p4: "{\"id\": \"123456\"}",
          p5: "成功"
        },
        {
          p1: "2020-10-10 23:23:11",
          p2: "admin",
          p3: "新增路灯设备",
          p4: "{\"id\": \"123456\"}",
          p5: "成功"
        },
        {
          p1: "2020-10-10 23:23:11",
          p2: "admin",
          p3: "新增路灯设备",
          p4: "{\"id\": \"123456\"}",
          p5: "成功"
        }
      ]
    }
  },
  methods: {
    pageMethod() {
      return Promise.resolve({
        data: {
          list: this.monitorList,
          total: this.monitorList.length,
        }
      });
    }
  }
})
</script>
<style lang="scss" scoped>

</style>